"""

@name:python学习
@author:yuki
@projectname:起步

"""
str = ''
with open("Walden.txt",mode="r+",encoding='utf-8') as sta:
    record = sta.read()
#非3元太难实现了
# for i in record:
#     if i.isalpha():
#         str = str.join(i)
#         print(str)
#     else:
#         str = str.join(" ")
str = ''.join(w if w.isalpha() else ' ' for w in record).lower()
list = str.lower().split()
statis = set(list)
for i in statis:
        time = list.count(i)
        print("'{0}':{1}".format(i,time))